package cc.rengu.igas.bomp.facade.enums;

/**
 * @author: zhangxuran
 * @Date: 2020/4/24 14:37
 * @Description: 商户属性
 */
public enum BompMchntAttributeEnum {

    /**
     * 线下商户
     */
    OFFLINE("01", "线下商户"),
    /**
     * 线上商户
     */
    ONLINE("10", "线上商户"),
    /**
     * 线上收银台
     */
    ONLINE_WITH_OFFLINE("11", "线上线下商户"),
    ;

    private String type;

    private String desc;

    public String getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    BompMchntAttributeEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static boolean verifyBompMchntAttributeEnumByType(String type) {
        if (null == type || "".equals(type)) {
            return false;
        }

        for (BompMchntAttributeEnum bompMchntAttributeEnum : values()) {
            if (bompMchntAttributeEnum.getType().equals(type)) {
                return true;
            }
        }

        return false;
    }
}
